<?php
	class FlinkModel extends Model{
		public $validate=array(
			array('fname','nonull','连接名称不能为空',2,3),
			);
		public function allData(){
			return $this->all();
		}
		public function addData(){
			if($this->create()){
				if($this->add()){
					return true;
				}else{
					return false;
				}
			}
		}
		public function oneData(){
			return $this->where(array('fid'=>$_GET['fid']))->find();
		}
		public function editData(){
			if($this->where(array('fid'=>$_GET['fid']))->save()){
				return true;
			}else{
				return false;
			}
		}
		public function delData(){
			if($this->where(array('fid'=>$_GET['fid']))->del()){
				return true;
			}else{
				return false;
			}
		}
	}
?>